<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>变量定义符号的</title>
</head>
<body>
    <script>
        //  console.log(name);//不可以被访问
        function foo()
        {
            console.log(name);
        }
        let name = "hhhh";
        foo();//函数是可以访问name的
    </script>
</body>
</html>